<template>
    <s-box title="" ref="loading">
          <template slot="header">
                <h1>Here might be a page title</h1>
          </template>
          <template v-slot:header>
              <div>
                  222222222222222222
              </div>
          </template>
          <template #header >
              <div>
                  33333333333
              </div>
          </template>
        <div class="chart-wrap" ref="chart"></div>
    </s-box>
</template>
<script>
import delegate from '../js/event.js';
import echarts from "echarts";
import data2 from "./guanxi.json";
import mixin from '../js/mixin.js';
export default {
    mixins:[mixin],
    data() {
        return {
           data2
        }
    },
    mounted(){
        this._initMethod();
    },
    beforeDestroy(){
         // 解除事件绑定
         delegate.$off('s-resize',this._initChart)
    },
    methods: {
        _initMethod() {
            delegate.$on('s-search',function(obj){
                console.log(1111111111,obj)
            })
            delegate.$on('s-resize',this._initChart)
        },
        _initChart(){

        }
    },
}
</script>
<style lang="scss" scoped>
  .chart-wrap{
      width: 100%;
      height: 100%;
  }
</style>
